package com.fastjars.business.spring.resolver.tree;

import com.fastjars.framework.pojo.BasePojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * BaseTree
 * 树形结构Pojo
 * @author Brant Liu <br> 邮箱：<br>lbf1988@qq.com <br>日期：<br>2017/12/24
 * @version 1.0.0
 */
public class BaseTree<E,ID extends Serializable> extends BasePojo<ID> implements Serializable {
    private static final long serialVersionUID = 1424982961040005886L;
    private ID id;
    private ID parentId;
    private Boolean checked;
    private Boolean spread;
    private Boolean disabled;
    private Boolean hasChild = false;
    private List<E> children=new ArrayList<E>();

    @Override
    public ID getId() {
        return id;
    }

    @Override
    public void setId(ID id) {
        this.id = id;
    }

    public ID getParentId() {
        return parentId;
    }

    public void setParentId(ID parentId) {
        this.parentId = parentId;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public Boolean getSpread() {
        return spread;
    }

    public void setSpread(Boolean spread) {
        this.spread = spread;
    }

    public Boolean getDisabled() {
        return disabled;
    }

    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

    public Boolean getHasChild() {
        return hasChild;
    }

    public void setHasChild(Boolean hasChild) {
        this.hasChild = hasChild;
    }

    public List<E> getChildren() {
        return children;
    }

    public void setChildren(List<E> children) {
        this.children = children;
    }
}
